using System;
using System.Collections;
using System.Xml.Serialization;

namespace com.exceptionalsoftware.spacetime.KML
{
	public class GeometryList
	{
		private ArrayList geometryList;

        public GeometryList()
		{
            this.geometryList = new ArrayList();
		}

        public GeometryList(Geometry[] geometries)
        {
            this.geometryList = new ArrayList(geometries);
        }

        [XmlIgnore()]
        public int Count
        {
            get { return this.geometryList.Count; }
        }

        [XmlIgnore()]
        public Geometry this[int index]
        {
            get { return (Geometry)this.geometryList[index]; }
        }

        public void Clear()
        {
            this.geometryList.Clear();
        }

        public void Add(Geometry g)
        {
            this.geometryList.Add(g);
        }

        public void Remove(Geometry g)
        {
            this.geometryList.Remove(g);
        }

        public Geometry[] ToArray()
        {
            return (Geometry[])this.geometryList.ToArray(typeof(Geometry));
        }
    }
}